from flask import Blueprint, request, jsonify
from tools.loggerHander import Logger
from tools.sqlSysConfig import get_rpa_info

# 创建蓝图对象
main_bp = Blueprint('main', __name__)
logger = Logger()


@main_bp.route('/')
def index():
    logger.info(f'服务正常启动: {request.host},服务器地址: {request.host}')
    return f"服务器地址: {request.host}"


@main_bp.route('/get_rpa', methods=['GET'])
def get_rpa():
    return get_rpa_info({})
